<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
</head>
<body>
<form th:action="@{/admin/updatePwd}"  method="post">
    用户名：
    <label>
        <input type="text" readonly="readonly" name="username" th:value="${session.Admin.username}"/>
    </label><br/>
    新密码：
    <label>
        <input type="password"  name="password" placeholder="请输入您的新密码" />
    </label>
    <br/>
    <button type="submit">修改密码</button>
    <span th:text="${msg}" style="display:none;" id="message"></span>
</form>
</body>
<script>
    window.onload = function() {
        var message = document.getElementById('message').textContent;
        if (message) {
            alert(message);
        }
    };
</script>
</html>